package com.woniuxy.dao;

import com.woniuxy.entity.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

public interface UserDao {
    @Select("select * from user where id = #{id} ")
    User findOne(int id);
    List<User> findAll();
    int addOne(User user);
    int updateOne(User user);
    @Delete("delete from user where id = #{id}")
    int deleteOne(int id);
    List<User> findOneByLikeName(String name);

    List<User> findByIds(@Param("ids") Integer[] ids);

    int addOneForMap(Map<String,Object> userinfo);
}
